package com.ocom.nettyxf.vo;

import lombok.Data;

/**
 * @Description: TODO
 * @Author: 朱晖
 * @Date: 2022/10/24
 **/
@Data
public class PayVo {
	//响应结果
	String code = "0000" ;

	//打折数
	String discount = "0000";

	//实际消费金额
	String realMoney = "00000000";
	//类型
	String type = "00";
	//姓名
	String name = "00000000000000000000";
	//个人密码
	String password = "00000000";
	//卡类型
	String cardType = "01";


	//卡有效日期
	String cardValid= "00000000000000";

	//个人充值余额
	String balance= "00000000";

	//补贴余额
	String subBalance= "00000000";

	public void setCardValid(String cardValid) {
		if(cardValid.length()!=14){
			cardValid = "20991231010203";
		}
		this.cardValid = cardValid;
	}

	public String getHexStr() throws Exception {
		return code
				+ discount
				+ realMoney
				+ type
				+ name
				+ password
				+ cardType
				+ cardValid
				+ balance
				+ subBalance
				;
	}
}
